﻿<?xml version="1.0" encoding="utf-8" ?>
<AdoNetDataAccess connection="$ArticleDBConnection$" formatter="bizobjlist of ArticleForm(article,user)">

  <Sql>
    SELECT        
        r.id, 
        r.lastUpdated, 
        r.formData, 
        a.id AS article_id,
        a.baseTitle AS article_baseTitle, 
        a.translatedTitles AS article_translatedTitles, 
        u.id AS user_id, 
        u.userName AS user_userName
    FROM ArticleFormUserResponses r INNER JOIN
      Articles a ON r.articleId = a.id INNER JOIN
      Users u ON r.userId = u.id
    WHERE (r.parentId = @parentId AND r.userId = @userId)
    ORDER BY a.baseTitle
  </Sql>
  <Param name="parentId" type="UniqueIdentifier" />
  <Param name="userId" type="UniqueIdentifier" />
</AdoNetDataAccess>
